<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">  
  <title>家具列表</title>
 </head>
 <body>
 <form method="post" action="del.php" enctype="multipart/form-data">
  <table align="center" width="80%" border=1>  
 <center><h3>家具列表</h3></center> 
 <tr>
   <th>图片</th>
   <th>名称</th>   
   <th>产地</th>
   <th>所属类别</th>
   <th>添加时间</th>
   <th>操作</th> 
 </tr>
 <?php
  require_once('system/dbconn.php');
  require_once('system/myfun.php');
  connect();
  $sql="select * from jiaju join category on jiaju.GL_cid=category.GL_cid"; 
  $result = fetch_array($sql); 
  if(is_array($result) && !empty($result)){  
 foreach($result as $row) 
  {
   echo '<tr>';
   echo '<td>'.$row['GL_jiajulink'].'</td>';
   echo '<td><a href="detail.php?id='.$row['GL_id'].'">'.$row['GL_name'].'</a></td>';
   echo '<td>'.$row['GL_intro'].'</td>';
   echo '<td>'.$row['GL_cname'].'</td>';
   echo '<td>'.$row['GL_adddate'].'</td>';
   echo '<td><a href="addjiaju.php?id='.$row['GL_id'].' ">修改</a> | 
             <a href="del.php?id='.$row['GL_id'].'" >删除</a></td>';
   echo '</tr>';  
  } 
}
?>
 </table>
 </html>




